﻿using System.Windows;

namespace Dsl.Ped.Common.Helpers 
{
    /// <summary>
    /// Helper of the <see cref="ResourceDictionary"/>
    /// </summary>
    public class ResourceDictionaryHelper {

        /// <summary>
        /// Loads a <see cref="dictionary"/> into a <see cref="resourceDictionary"/>
        /// </summary>
        /// <param name="resourceDictionary">Dictionary into which the <see cref="dictionary"/> is about to be loaded</param>
        /// <param name="dictionary">Dictionary that should be loaded into <see cref="resourceDictionary"/></param>
        public static void LoadResourceDictionary(ResourceDictionary resourceDictionary, ResourceDictionary dictionary) 
        {
            if (dictionary != null)
            {
                resourceDictionary.MergedDictionaries.Add(dictionary);
            }
        }
    }
}
